SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS OFF
GO
CREATE PROCEDURE [dbo].[paCertificaObtenerAreasTematicas]
-- < Registro de Actualizaciones >
-- 16-11-2006

	@IdSubProyecto INT

AS
SET NOCOUNT ON
SET DATEFORMAT DMY
SELECT A.IdAreaTematica AS ID, A.Descripcion +' - '+M.Mnemo as Descripcion
	FROM tb_AreasTematicas  A
	INNER JOIN tb_MacroAreasTematicas M ON M.IdMacroAreaTematica= A.MacroAreaTematica
	WHERE A.IdAreaTematica NOT IN (SELECT   ASP.IdAreaTematica FROM tb_RelAreasTematicasSP ASP  WHERE  ASP.IdSubProyecto=@IdSubProyecto)
	ORDER BY Descripcion
GO
GRANT EXECUTE ON  [dbo].[paCertificaObtenerAreasTematicas] TO [Certificaciones]
GRANT EXECUTE ON  [dbo].[paCertificaObtenerAreasTematicas] TO [CertificacionesAdministracion]
GRANT EXECUTE ON  [dbo].[paCertificaObtenerAreasTematicas] TO [SoloVer]
GO
